                    <div class="table">    
                        <div class="action">
                            <h5>
								BUKU BANK<br />
                                PT. Bayu Buana Gemilang <br />
                                Rekapitulasi 
                                Kurs <?=decimal($kurs['Value'],2)?> <br />
                                Bulan <?=month_name($month)?> Tahun <?=$year?> 
							</h5>
			         	</div>
                        
						<table>
							<thead>
								<tr>
									<th><?=lang('no')?></th>
                                    <th><?=lang('bank')?></th>
                                    <th><?=lang('account')?></th>
                                    <th><?=lang('currency')?></th>
                                    <th><?=lang('saldo')?></th>
								</tr>
                                
							</thead>
							<tbody>
                                <?php 
                                    $i=1;
                                    $usd = 0;
                                ?>
                                <?php foreach($accounts as $row): ?>
                                <?php $saldo = $this->accounts->getAccountSaldo($row['NoRekening'],$month,$year);?> 
                                <?php if(($row['MataUang']=='USD') && (isset($saldo['Saldo'])!=0) ):?>
                                <tr>
                                    <td class="left" style="width:2%;"><?=$i?></td>
                                    <td class="left"><?=$row['Branch']?></td>
                                    <td class="left"><?=$row['NoRekening']?></td>
                                    <th style="width:10%;"></th>
                                    <td class="right"><?=decimal($saldo['Saldo'],2)?></td>
                                </tr>
                                <?php 
                                        if(COUNT($saldo)) $usd_saldo = $saldo['Saldo']; else $usd_saldo=0; 
                                        $usd = $usd + $usd_saldo;
                                        $i++;
                                    endif;?>
                                <?php 
                                    
                                    endforeach;?>
                                <tr>
                                    <th></th>
                                    <th></th>
                                    <th class="right">Total</th>
                                    <th class="right">USD</th>
                                    <th class="right"><?=decimal($usd,2)?></th>
                                </tr>
                                
                                <tr>
                                    <th></th>
                                    <th></th>
                                    <th class="right">Kurs IDR</th>
                                    <th class="right">IDR</th>
                                    <th class="right"><?=decimal($idrVal = $usd * $kurs['Value'] ,2)?></th>
                                </tr>
                                
                                <?php 
                                     $i=$i+1;
                                     $idr = 0;
                                ?>
                                <?php foreach($accounts as $row): ?>
                                <?php $saldo = $this->accounts->getAccountSaldo($row['NoRekening'],$month,$year);?> 
                                 <?php if(($row['MataUang']=='IDR') && (isset($saldo['Saldo'])!=0) ):?>
                                <tr>
                                    <td class="left" style="width:2%;"><?=$i?></td>
                                    <td class="left"><?=$row['Branch']?></td>
                                    <td class="left"><p><?=$row['NoRekening']?></p></td>
                                    <td></td>
                                    <td class="right"><?php if(COUNT($saldo)) echo decimal($saldo['Saldo'],2);?></td>
                                </tr>
                                <?php 
                                        if(COUNT($saldo)) $idr_saldo = $saldo['Saldo']; else $idr_saldo=0; 
                                        $idr = $idr + $idr_saldo;
                                        $i++;
                                        endif;?>
                                <?php 
                                    
                                    endforeach;?>
                                <tr>
                                    <th></th>
                                    <th></th>
                                    <th class="right">Total</th>
                                    <th class="right">IDR</th>
                                    <th class="right"><?=decimal($idr,2)?></th>
                                </tr>
							</tbody>
                            <tfoot>
                                <tr>
                                    <th></th>
                                    <th></th>
                                    <th class="right">Total All</th>
                                    <th class="right">IDR</th>
                                    <th class="right"><?=decimal($idr + $idrVal ,2)?></th>
                                </tr>
                            </tfoot>
						</table>
					</div>